<template>
  <el-container class="home-container">
    <!-- 头部区域 -->
    <home-header></home-header>
    <!-- 主体区域 -->
    <el-container class="home-main">
      <!-- 左侧栏 -->
      <home-aside :menuList="menuList"></home-aside>
      <!-- 右侧栏 -->
      <home-main></home-main>
    </el-container>
  </el-container>
</template>

<script>
import HomeAside from "../home/homeChildren/HomeAside.vue";
import HomeHeader from "../home/homeChildren/HomeHeader.vue";
import HomeMain from "../home/homeChildren/HomeMain.vue";
import { NavMenu } from "@/network/NavMenu";
export default {
  components: { HomeHeader, HomeAside, HomeMain },
  name: "Home",
  data() {
    return {
      menuList:[]
    }
  },
  created() {
    NavMenu().then((res) => {
      const { data, meta } = res;
      if (meta.status !== 200) return this.$messeag.error(meta.msg);
      this.menuList = data;
    });
  },
};
</script>

<style scoped>
.home-container {
  position: absolute;
  width: 100%;
  height: 100%;
}
.home-main {
  position: absolute;
  width: 100%;
  height: 100%;
  margin-top: 60px;
}
</style>